package com.ruoyi.carShopService.service.impl;

import java.util.List;

import com.ruoyi.system.api.domain.CarShopCoupon;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.carShopService.mapper.CarShopCouponMapper;
import com.ruoyi.carShopService.service.ICarShopCouponService;

/**
 * 优惠券信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-09-14
 */
@Service
public class CarShopCouponServiceImpl implements ICarShopCouponService 
{
    @Autowired
    private CarShopCouponMapper carShopCouponMapper;

    /**
     * 查询优惠券信息
     * 
     * @param couId 优惠券信息主键
     * @return 优惠券信息
     */
    @Override
    public CarShopCoupon selectCarShopCouponByCouId(Long couId)
    {
        return carShopCouponMapper.selectCarShopCouponByCouId(couId);
    }

    /**
     * 查询优惠券信息列表
     * 
     * @param carShopCoupon 优惠券信息
     * @return 优惠券信息
     */
    @Override
    public List<CarShopCoupon> selectCarShopCouponList(CarShopCoupon carShopCoupon)
    {
        return carShopCouponMapper.selectCarShopCouponList(carShopCoupon);
    }

    /**
     * 新增优惠券信息
     * 
     * @param carShopCoupon 优惠券信息
     * @return 结果
     */
    @Override
    public int insertCarShopCoupon(CarShopCoupon carShopCoupon)
    {
        return carShopCouponMapper.insertCarShopCoupon(carShopCoupon);
    }

    /**
     * 修改优惠券信息
     * 
     * @param carShopCoupon 优惠券信息
     * @return 结果
     */
    @Override
    public int updateCarShopCoupon(CarShopCoupon carShopCoupon)
    {
        return carShopCouponMapper.updateCarShopCoupon(carShopCoupon);
    }

    /**
     * 批量删除优惠券信息
     * 
     * @param couIds 需要删除的优惠券信息主键
     * @return 结果
     */
    @Override
    public int deleteCarShopCouponByCouIds(Long[] couIds)
    {
        return carShopCouponMapper.deleteCarShopCouponByCouIds(couIds);
    }

    /**
     * 删除优惠券信息信息
     * 
     * @param couId 优惠券信息主键
     * @return 结果
     */
    @Override
    public int deleteCarShopCouponByCouId(Long couId)
    {
        return carShopCouponMapper.deleteCarShopCouponByCouId(couId);
    }
}
